package com.openbravo.pos.ticket;

import com.openbravo.basic.BasicException;
import com.openbravo.data.loader.DataRead;
import com.openbravo.data.loader.SerializableRead;
import com.openbravo.format.Formats;
import java.util.Date;

public class FindTicketsInfo
  implements SerializableRead
{
  private int ticketid;
  private int tickettype;
  private Date date;
  private String name;
  private String customer;
  private double total;

  public void readValues(DataRead paramDataRead)
    throws BasicException
  {
    this.ticketid = paramDataRead.getInt(1).intValue();
    this.tickettype = paramDataRead.getInt(2).intValue();
    this.date = paramDataRead.getTimestamp(3);
    this.name = paramDataRead.getString(4);
    this.customer = paramDataRead.getString(5);
    this.total = (paramDataRead.getObject(6) == null ? 0.0D : paramDataRead.getDouble(6).doubleValue());
  }

  public String toString()
  {
    String str1 = this.customer == null ? "" : this.customer;
    String str2 = "<tr><td width=\"30\">[" + this.ticketid + "]" + "</td>" + "<td width=\"100\">" + Formats.TIMESTAMP.formatValue(this.date) + "</td>" + "<td align=\"center\" width=\"100\">" + str1 + "</td>" + "<td align=\"right\" width=\"100\">" + Formats.CURRENCY.formatValue(Double.valueOf(this.total)) + "</td>" + "<td width=\"100\">" + Formats.STRING.formatValue(this.name) + "</td></tr>";
    return str2;
  }

  public int getTicketId()
  {
    return this.ticketid;
  }

  public int getTicketType()
  {
    return this.tickettype;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.ticket.FindTicketsInfo
 * JD-Core Version:    0.6.0
 */